import { useEffect } from 'react';
import { RouterProvider } from 'react-router-dom';

import StyleTag from './components/StyleTag';
import store from './reducers';
import { getUser } from './reducers/user';
import router from './routes/router';

const App = () => {
  useEffect(() => {
    store.dispatch(getUser());
  }, []);

  return (
    <>
      <StyleTag />
      <RouterProvider router={router} />
    </>
  );
};

export default App;
